package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.IFMotoGeneralService;
import com.iwop.moto.service.IFMotoParamlService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chenzq on 2016/11/3.
 */
@SuppressWarnings("serial")
@Service("fMotoParamService")
public class FMotoParamServiceImpl extends BaseService implements IFMotoParamlService {

    /**
     * 数据表:F_MOTO_PARAM 部件属性表
     * 功能说明：部件属性信息 新增
     * @param SRModel
     */
    public void insertSelective(SuperRecordModel SRModel) {
        getSqlSession().insert("FMotoParamMapper.insertSelective", SRModel);
    }

    @Override
    public List<SuperRecordModel> findMotoParamByParamKey(String  paramKey) {
        return getSqlSession().selectList("FMotoParamMapper.findMotoParamByParamKey", paramKey);

    }

    public void updeteSelective(SuperRecordModel srm) {
        getSqlSession().update("FMotoParamMapper.updeteSelective",srm);
    }



    /**
     * 数据表:F_MOTO_GENERAL 部件信息表
     * 功能说明:部件信息 - 软删除
     *
     * @return void
     */
    @Override
    public void updatePartStatus(SuperRecordModel SRModel) {
        getSqlSession().selectOne("FMotoParamMapper.updatePartStatus",SRModel);
    }

    /**
     * 根据fkey 物理删除数据
     */
    @Override
    public void deleteByParamFkey(String param_fkey) {
        getSqlSession().delete("FMotoParamMapper.deleteByParamFkey", param_fkey);
    }

}
